// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.core.opengl;

import org.lwjgl.util.vector.Matrix4f;
import zombie.core.textures.Texture;
import zombie.iso.Vector2;
import zombie.iso.Vector3;

public final class SmartShader {
    private final ShaderProgram m_shaderProgram;

    public SmartShader(String name) {
        this.m_shaderProgram = ShaderProgram.createShaderProgram(name, false, true);
    }

    public SmartShader(String name, boolean bStatic) {
        this.m_shaderProgram = ShaderProgram.createShaderProgram(name, bStatic, true);
    }

    public void Start() {
        this.m_shaderProgram.Start();
    }

    public void End() {
        this.m_shaderProgram.End();
    }

    public void setValue(String loc, float val) {
        this.m_shaderProgram.setValue(loc, val);
    }

    public void setValue(String loc, int val) {
        this.m_shaderProgram.setValue(loc, val);
    }

    public void setValue(String loc, Vector3 val) {
        this.m_shaderProgram.setValue(loc, val);
    }

    public void setValue(String loc, Vector2 val) {
        this.m_shaderProgram.setValue(loc, val);
    }

    public void setVector2f(String loc, float f1, float f2) {
        this.m_shaderProgram.setVector2(loc, f1, f2);
    }

    public void setVector3f(String loc, float f1, float f2, float f3) {
        this.m_shaderProgram.setVector3(loc, f1, f2, f3);
    }

    public void setVector4f(String loc, float f1, float f2, float f3, float f4) {
        this.m_shaderProgram.setVector4(loc, f1, f2, f3, f4);
    }

    public void setValue(String string, Matrix4f matrix4f) {
        this.m_shaderProgram.setValue(string, matrix4f);
    }

    public void setValue(String loc, Texture tex, int samplerUnit) {
        this.m_shaderProgram.setValue(loc, tex, samplerUnit);
    }
}
